<?php
/**
* 安卓版本配置后台 Controller
*
* 安卓版本配置后台 Controller的注意及说明
* 以下use模块请不要互相伤害
*
* @author    xiecz <xiecz@yunys.com.cn>
* @copyright 2016 QuanZhouYunYiShang Inc.
*/

namespace App\Http\Controllers\Backstage;

use Illuminate\Routing\Controller as BaseController;
use Response, Request;
use App\Services\Config\AndroidBackstage;

class AndroidController extends BaseController{

    function __construct(AndroidBackstage $config){
        $this->config = $config;
    }

    /**
     * 安卓版本信息列表
     * @return [type] [description]
     */
    function getAndroidVersionList(){
        $input  = Request::all();
        $result = $this->config->get_android_version_list($input);
        return view('backstage.android.android-version-list')->with('lists',$result);
    }
    /**
     * 安卓版本录入页
     * @return [type] [description]
     */
    function newAndroidVersion(){
        return view('backstage.android.new-android-version');
    }

    /**
     * 安卓版本录入
     * @return [type] [description]
     */
    function insertAndroidVersion(){
        $input  = Request::all();
        $result = $this->config->insert_android_version($input);
        return response()->json($result);
    }
    /**
     * 删除安卓版本信息
     * @return [type] [description]
     */
    function deleteAndroidVersion(){
        $input  = Request::all();
        $result = $this->config->deleteAndroidVersion($input);
        return response()->json($result);
    }
}
